import type { ReactNode } from 'react';
import { ProProvider } from '@ant-design/pro-components';
import { useContext } from 'react';
import { valueTypeMap } from './valueType';

const SysProvider = (props: {
  children: ReactNode;
}) => {
  const {
    children,
  } = props;
  const values = useContext(ProProvider);

  return (<ProProvider.Provider
    value={{
      ...values,
      valueTypeMap,
    }}>
    {children}
  </ProProvider.Provider>);
};

export default SysProvider;
